package zookeeper.impl;

//公共资源，多线程下需要用锁保证线程安全
public class CommonResources {

    private static int count = 100;

    public void sale() {
        --count;
        System.out.println(Thread.currentThread().getName() + "卖出一张票还剩余：" + count);
    }

}
